package logger

import (
	"fmt"
	"io"
	"os"
)

const (
	RedError      = "\033[1;31m[Fuck]Error: "
	YellowWarning = "\033[1;33m[Fuck]Warning: "
	GreenLog      = "\033[1;32m[Fuck]Log: "
	Red           = "\033[1;31m"
	Yellow        = "\033[1;33m"
	Green         = "\033[1;32m"
	Light         = "\033[1m"
	Default       = "\033[0m"
)

func PrintfRed(str string, a ...any) {
	fmt.Printf(Red+str+Default, a...)
}
func PrintfYellow(str string, a ...any) {
	fmt.Printf(Yellow+str+Default, a...)
}
func PrintfGreen(str string, a ...any) {
	fmt.Printf(Green+str+Default, a...)
}

func Flogf(out io.Writer, str string, a ...any) {
	fmt.Fprintf(out, GreenLog+str+Default, a...)
}

func Fwarningf(out io.Writer, str string, a ...any) {
	fmt.Fprintf(out, YellowWarning+str+Default, a...)
}

func Ferrorf(out io.Writer, str string, a ...any) {
	fmt.Fprintf(out, RedError+str+Default, a...)
}

func Logf(str string, a ...any) {
	Flogf(os.Stdout, str, a...)
}
func Warningf(str string, a ...any) {
	Fwarningf(os.Stdout, str, a...)
}
func Errorf(str string, a ...any) {
	Ferrorf(os.Stdout, str, a...)
}

func Logln(str string) {
	fmt.Println(GreenLog + str + Default)
}

func Warningln(str string) {
	fmt.Println(YellowWarning + str + Default)
}

func Errorln(str string) {
	fmt.Println(RedError + str + Default)
}
